fix windows release with Qt6. (#748)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 29 Oct 2021 00:24:00 +0000 (18:24 -0600)
committerGitHub <noreply@github.com>
Fri, 29 Oct 2021 00:24:00 +0000 (18:24 -0600)
* fix windows release with Qt6.

windeployqt failed to deploy Qt6Core5Compat.dll because it was
not used by the gui and we didn't tell windeployqt there was
another executable to scan for dependencies.

* fiddle with github cache conditionals.

cache was restored, but we tried to install qt anyway.

* Revert "fiddle with github cache conditionals."

This reverts commit fece79e5e56de2f957960236bb851c6bc7682d7c.

* try to get github action conditionals working again.

* Revert "try to get github action conditionals working again."

This reverts commit 3152108e5267580f3836b9f6aadc7dfa2ecfe347.

* work around apparent bug in github action conditonal processing.

* the second half of the workaround

* fool around with bash

* more bash foolishness.

.github/workflows/macos.yml
tools/make_windows_release.ps1
tools/travis_install_osx

index b0ee03c8c5833c8312ca90897568935fc914581b..0ad0cfaa0d625382463a2e35ea8fd4995232c2b6 100644 (file)
@@ -111,10 +111,10 @@ jobs:
 
     - name: Qt install
       if: steps.cache.outputs.cache-hit != 'true'
+      env:
+        TRAVIS_BUILD_DIR: ${{ github.workspace }}
       run: |
-        pip3 install aqtinstall>=2.0.0
-        ./tools/ci_install_qt.sh mac ${QT_VERSION} clang_64 ${HOME}/Cache/Qt
-        echo "export PATH=${HOME}/Cache/Qt/${QT_VERSION}/macos/bin:\$PATH" > "${HOME}/Cache/qt-${QT_VERSION}.env"
+        ./tools/travis_install_osx ${QT_VERSION} aqt
 
     - name: Script
       run: |
index 236e3ec1f98b54886c7a3df9577d649429d416b1..54ebefc0eac89b2901e6518ea0a9152b93f9b3f3 100755 (executable)
@@ -105,7 +105,7 @@ New-Item "$($gui_build_dir)\package" -type directory -Force | Out-Null
 Copy-Item "$($gpsbabel_build_dir)\release\GPSBabel.exe" "$($gui_build_dir)\package\GPSBabel.exe"\r
 Copy-Item "$($gui_build_dir)\release\GPSBabelFE.exe" "$($gui_build_dir)\package\GPSBabelFE.exe"\r
 # use --plugindir option to locate the plugins.\r
-& "$($windeployqt)" --verbose 1 --plugindir package\plugins package\GPSBabelFE.exe\r
+& "$($windeployqt)" --verbose 1 --plugindir package\plugins package\GPSBabelFE.exe package\GPSBabel.exe\r
 if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }\r
 if ($buildinstaller -eq "true") {\r
     Set-Location "$($gpsbabel_src_dir)\gui"\r
index 3f6677eadb897dde16e0d53a5d9c8f40b31d0a2c..64ba6775d3bdb951cb1b231becab24207b6f52f3 100755 (executable)
@@ -33,7 +33,11 @@ METHOD=${2:-artifactory}
 
 # our expectation is that install-qt creates $QTDIR, $QTDIR/bin.
 CACHEDIR=${HOME}/Cache
-QTDIR=${CACHEDIR}/Qt/${QT_VERSION}/clang_64
+if [ "$METHOD" = "aqt" ]; then
+  QTDIR=${CACHEDIR}/Qt/${QT_VERSION}/macos
+else
+  QTDIR=${CACHEDIR}/Qt/${QT_VERSION}/clang_64
+fi
 
 if [ -d "${QTDIR}/bin" ]; then
   echo "Using cached Qt."
@@ -73,6 +77,10 @@ else
         rm -f "/tmp/${archive}"
       fi
      )
+  elif [ "$METHOD" = "aqt" ]; then
+    pip3 install aqtinstall>=2.0.0
+    "${TRAVIS_BUILD_DIR}/tools/ci_install_qt.sh" mac "${QT_VERSION}" clang_64 "${CACHEDIR}/Qt"
+    echo "export PATH=${CACHEDIR}/Qt/${QT_VERSION}/macos/bin:\$PATH" > "${CACHEDIR}/qt-${QT_VERSION}.env"
   else
     # install-qt creates the install at $PWD/Qt.
     QT_VERSION_SHORT=${QT_VERSION//./}